/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.testis.testdriver.operations;

import org.testis.testdriver.*;
import org.testis.testdriver.AtofEnumaration.DebuggingMode;

/**
 * This class is the TestPartOperation Decorator to execute logging of TestPart
 * result to logger objects. 
 * 
 * @author barisergun
 */
public class TestPartOperationLogPartResult extends TestPartOperationDecorator
{

    private TestPart testPartInRun;

    public TestPartOperationLogPartResult(TestPart testPart)
    {
        testPartInRun = testPart;

    }

    @Override
    public boolean runOperation(DebuggingMode mode) throws InterruptedException
    {
        boolean result = super.runOperation(mode);
        runSpecificBehaviour();
        return result;
    }

    /**
     * This method is used to drive the specific Tasks that belong to this decorator
     * operation.
     * 
     * @return boolean the result of operation. This result will affect the operation
     * of linked decorator tasks. 
     */
    private boolean runSpecificBehaviour() throws InterruptedException
    {
        logPartResults(testPartInRun);
        
        return true;

    }
}


